/*  -*- mode: c++; coding: utf-8; c-file-style: "stroustrup"; -*-

    Copyright 2008 Asier Aguirre <asier.aguirre@gmail.com>
    This file is part of Intromit.

    Intromit is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Intromit is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Intromit.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PYTHON_DOC_HH
#define PYTHON_DOC_HH

// TEST DOCUMENTATION AND ATTRIBUTES IN DETAIL

// doc test class
class docum1
{

public:

    // lost

    //	 constructor doc
    docum1();  // over the ctor comment has preference
    void docum_fun1();
    // lost2
};

// this comment should not appear because should be next to code

class docum2
{
public:
    docum2(); //!< second ctor
    /*
      docum_fun2
    */
    void docum_fun2(); // no reference
};

// lost

	    // extrange comment
	    // more here
class docum3
{
public:
    docum3(); /** hello
		       how are you */
    ///
    /// docum_fun3
    ///
    ///
    void docum_fun3(); // no preference
};

// @priority("high"):abstract
class docum4
{
    int member1, with1;
    // i suppose @ro:select:do_not_serialize("by means of python"):so_on this is member2
    int member2, with2;
    int member3;

    double member4, with4;
    // this all members will be selected @:::select:emacs_rlz:@{

    /*
      comment on member5 @read_only
    */
    int member5; //!< this is member5
    int post5;   //   @~select note, the following blank line is required

	// comment on member6 @del_attr
	// continue
    float member6, with6;
    // end of block @}
    int member7, with7;

    //  @select
    //! Doxygen compatibility
    int member8;

    // order in badly constructed attribute @ro:~ro:select 1/2
    float member9;
    // order in badly constructed attribute @~ro:select:ro 2/2
    float member10;

    // order in several attributes @select:ro
    // @~ro 1/2
    double member11;
    // order in several attributes @~ro
    // @select:ro 1/2
    double member12;

    // hierarchical attributes @select:ro{
    int member13;
    // @~ro
    bool member14;
    // @~ro{
    float member15;
    // @ro
    float member16;
    // @} @} block terminators must be in different attributes!

public:
    docum4(); // comment @attribute more comment

    // this method is selected @select
    void selected();
    void not_selected();

    void method1();
    // select this all methods @select{
    void method2();
    void method3();
    // @}
    void method4();
};

class docum5
{
    int member1;
    // ** PRIVATE MEMBERS **
    int member2;
    float member3;
    // ** STATUS MEMBERS **
    float member4, with4;
    double member5;
    // ** PRIVATE MEMBERS **
    double member6, with6;
    bool member7;
    // ** STATUS MEMBERS **
    bool member8;
public:
    docum5();
};

// This class is not necessary @~select
class docum6
{
    int member1;
public:
    docum6();
};

class docum7
{
    int member1;
    // @line1
    int member2;
    // @block{
    int member3;
    // @line2
    int member4; // @}
    // @ro
    int member5;
    // @ro{
    int member6; // @}
    // @~ro{ @~ro
    int member7; // @}
    int member8;

    int forced_reference_count;

    float group1, group2, group3, group4, group5;
    float group6, group7, group8, group9, group0;
public:
    docum7();
};

class docum8
{
    // interface @select
    int member1;

    // private member
    int member2;

    // test for nopickle @select:nopickle
    int member3;

    // test for private @select:private
    int member4;

public:
    docum8();

    // interface @select{
    void set_member2(int x);
    int get_member2();

    void init();   // @postunpickle
    void finish(); // @prepickle

    int test_private(float x); // @private @}
};

/* Offline metadata attributes:

   @metadata_attrs(
	# comment
	docum7:				priority(6), # class docum7 attr
					other_attr   # other class attr
	{
		member1:		ro,	     # member attribute
					other("#")   # parse comment
		docum7:                 ctor
		member2:                off1
		member3:                off2
		member4:                off3
		       :		test_colon
		member5:                ~ro          # this has priority
		member6:                ~ro          # the same for this
		member7:                ro
		member8:                ~select

		forced_reference_count:	a, refcnt, z
	}
	# other class
	docum8:

						     # some spaces here

					priority(-1)
	{
		nested{ctor:ctor{{{{x:}}{}}}}test{}  # just for fun }{"}"
	}

	docum7{#back to this class again
		group1, group2, group3, group4, group5,
		group6, group7, group8, group9, group0:
			group_of_float(10),
			more, attributes, for, group
	}

	# other ofuscated examples to check robustness of parser
	test::::{:}{{::}} : { : : { : } : }

	# add a missing attr
	docum7{member4:plus}

	# end of offline attrib asignation
   )
*/

#endif
